home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / System-Boost / Workbench / Archive / ViewDiz / ViewDiz-extras / S / PlayTune.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-11-09  |  2.9 KB  |  178 lines

  1. /*
  2.  $VER: PlayTune.Rexx 1.2 (23.9.98) Mikael Lund
  3. */
  4.  
  5. _PAUSE="Playing paused/resumed."
  6. _EJECT="Module ejected."
  7. _NEXT ="Playing next subsong."
  8. _QUIT ="Player terminated."
  9.  
  10. options results
  11. parse arg file
  12.  
  13. if show('P','DELITRACKER') then do
  14.     address 'DELITRACKER'
  15.     if file="QUIT"  then call CustomQuit
  16.     if file="EJECT" then call CustomEject
  17.     if index("PLAYSTOP",file)>0 then do
  18.         playpause
  19.         say _PAUSE
  20.         exit
  21.     end
  22.     if file="NEXT" then do
  23.         NextSubSong;say _NEXT;Exit
  24.     end
  25.     Playmod file
  26.     if rc>0 then break
  27.     exit
  28. end
  29.  
  30. if show('P','rexx_EP') then do
  31.     address 'rexx_EP'
  32.     if file="QUIT" then  call CustomQuit
  33.     if file="EJECT" then call CustomEject
  34.     if index("PLAYSTOP",file)>0 then do
  35.         STATUS "G" "PLY"
  36.         if result="yes" then STOP
  37.         if result="no" then PLAY
  38.         say _PAUSE
  39.         exit
  40.     end
  41.     if file="NEXT" then do
  42.         NEXTSONG;say _NEXT;Exit
  43.     end
  44.     LOADMODULE '"'file'"'
  45.     PLAY
  46.     exit
  47. end
  48.  
  49. if show('P','HIPPOPLAYER') then do
  50.     address 'HIPPOPLAYER'
  51.     if file="QUIT" then  call CustomQuit
  52.     if file="EJECT" then call CustomEject
  53.     if index("PLAYSTOP",file)>0 then do
  54.         Get PLAY
  55.         if result=1 then STOP
  56.         if result=0 then CONT
  57.         say _PAUSE
  58.         exit
  59.     end
  60.     if file="NEXT" then do
  61.         Get CSNG;song=result
  62.         Get NSNG
  63.         If song<result then Songplay song+1
  64.         say _NEXT
  65.         Exit
  66.     end
  67.     Play file
  68.     exit
  69. end
  70.  
  71. if show('P','AMODPLAY') then do
  72.     address 'AMODPLAY'
  73.     if file="QUIT" then call CustomQuit
  74.     if file="STOP" then call CustomStop
  75.     if file="PLAY" then do
  76.         cont
  77.         say _PAUSE
  78.     end
  79.     if file="EJECT" then do
  80.         unload;say _EJECT;exit
  81.     end
  82.     load file
  83.     if rc>0 then break
  84.     play
  85.     exit
  86. end
  87.  
  88. /** Multi_Player by Thomas Landspurg **/
  89. if show('P','Multi_Player') then do
  90.     address 'Multi_Player'
  91.     if file="STOP" then call CustomStop
  92.     if file="QUIT" then call CustomQuit
  93.     if file="PLAY" then do
  94.         start
  95.         say _PAUSE
  96.         exit
  97.     end
  98.     "Play "file
  99.     if rc>0 then break
  100.     exit
  101. end
  102.  
  103. /** Multiplayer, ©1992 Bryan Ford **/
  104. if show('P','RXTRACKER') then do
  105.     address 'RXTRACKER'
  106.     if file="QUIT" then call CustomQuit
  107.     if file="STOP" then call CustomStop
  108.     if file="EJECT" then do
  109.         UNLOAD
  110.         say _EJECT
  111.         exit
  112.     end
  113.     if file="PLAY" then do
  114.         CONTINUE
  115.         say _PAUSE
  116.         exit
  117.     end
  118.     play '"'file'"'
  119.     if rc>0 then break
  120.     exit
  121. end
  122. if show('P','PowerPlayer.REXX') then do
  123.     address 'PowerPlayer.REXX'
  124.     if file="QUIT" then do;PlQuit;exit;end
  125.     if file="EJECT" then do;PlEject;exit;end
  126.     if index("PLAYSTOP",file)>0 then do
  127.         PlPause
  128.         exit
  129.     end
  130.     PlLoad file
  131.     exit
  132. end
  133.  
  134. if show('P','DOPUS.1') then do
  135.     address 'DOPUS.1'
  136.     dopus version
  137.     if (result='RESULT'|translate(result,'.',' ')<5) then break
  138.     dopus getfiletype '"'file'"' ID
  139.     if result='MOD' then do
  140.         command play '"'file'"'
  141.         if rc=0 then exit
  142.     end
  143. end
  144.  
  145. if show('P','PLAYSID') then do
  146.     address 'PLAYSID'
  147.     if index("PLAYSTOP",file)>0 then do
  148.         SID_PAUSE()
  149.         say _PAUSE
  150.         exit
  151.     end
  152.     if file="QUIT" then do
  153.         SID_QUIT()
  154.         say _QUIT
  155.         exit
  156.     end
  157.     SID_LOAD(file)
  158.     SID_PLAY()
  159.     exit
  160. end
  161. exit(5)
  162.  
  163. CustomStop:
  164.     stop
  165.     say _PAUSE
  166.     exit
  167.     return
  168. CustomQuit:
  169.     quit
  170.     say _QUIT
  171.     exit
  172.     return
  173. CustomEject:
  174.     eject
  175.     say _EJECT
  176.     exit
  177.     return
  178.